<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Member Viewer</title>
    <link rel="stylesheet" href="../../lib/bootstrap/3.3.5/css/bootstrap.min.css"/>
</head>
<body>
	<!--
	<div id="app" class="container">
	-->
	<div id="app" class="container-fluid">

	<div class="row-fluid">
		<div class="col-sm-12">
			<h3 class="page-header text-center">
			通信录 <small>(Member Viewer)</small>
			</h3>
		</div>
	</div>

	<div class="row">
		<div class="col-sm-12">
			<div class="col-sm-2">
				<button class="btn btn-default " v-on="click:removeSelected($event)">删除选中记录</button>
			</div>
			<form id="search" class="form-group">
				<div class="col-sm-offset-4 col-sm-3">
					<input id="searchQuery" name="query" type="text" style="float:right" v-model="searchQuery" class="form-control" required />
				</div>
				<div class="col-sm-2">
					<button id='search' class="btn btn-outline btn-block btn-success save"><strong>搜索</strong></button>
				</div>
				<div class="col-sm-1 text-left vertical-middle-sm">
					<h5><strong>
						<a role="button" data-toggle="collapse" href="#advancedsearch" aria-expanded="false" aria-controls="advancedsearch">高级...</a>
					</strong></h5>
				</div>
			</form>
		</div>
	</div>

	<div class="row">
		<div class="collapse col-sm-12" id="advancedsearch">
			<div class="well">
					<form class="form-horizontal contract-form">
						<div class="form-group">
							<label class="col-sm-1 control-label">Begin Time</label>
							<div class="col-sm-4">
								<input id="begintime" name="begintime" type="text" v-model="begintime" value="2015-01-01" class="form-control" required />
							</div>
							<label class="col-sm-3 control-label">End Time</label>
							<div class="col-sm-4">
								<input id="endtime" name="endtime" type="text" v-model="endtime" value="2015-02-01"
									class="form-control" required />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-1 control-label">Logger Id</label>
							<div class="col-sm-4">
								<input id="deviceid" name="deviceid" type="text" v-model="remotedevice" value=""
									class="form-control" required />
							</div>
						</div>
						
						<div class="form-group">
							<div class="col-sm-offset-9 col-sm-1">
								<button class="btn btn-outline btn-block btn-warning">清除</button>
							</div>
							<div class="col-sm-2">
								<!--
								<button id='submitbutton' type="submit" class="btn btn-outline btn-lg btn-block save">Submit</button>
								-->
								<button id='submitbutton' class="btn btn-outline btn-block btn-success save">提交</button>
							</div>
						</div>
					</form>
			</div> 
		</div> <!-- advancedsearch -->
	</div>

	<div class="row">
		<div class="col-sm-12">
			<br/>
		</div>
	</div>

	<div class="row">
		<div class="table-responsive col-sm-12">
			<table class="table table-bordered table-condensed table-striped">
			<thead>
				<tr class="info"> 
				<th>选择</th> 
				<th>时刻</th> 
				<th>设备标识</th> 
				<th>数据</th> 
				<th>操作</th> 
				</tr>
				<!--
				<tr> 
				<th>#</th> 
				<th>Timestamp</th> 
				<th>Device Node</th> 
				<th>Payload</th> 
				<th>Operation</th> 
				</tr> 
				-->
			</thead>
			<!--
			<tfoot>Table footer</tfoot>			
			-->
			<tbody>
				<tr v-repeat="item:items" track-by="rowid">
				<td><input type="checkbox" v-model="item.selected"> </td> 
				<td>{{item.timestamp}}</td> 
				<td>{{item.node}}</td> 
				<td>{{item.frame}}</td> 
				<td><button class="btn btn-default btn-xs " v-on="click:removeItem(item,$event)"> .删除. </button></td>
				</tr> 
			</tbody>
			</table>
		</div>
	
		<div class="col-sm-12">
		注：输入流数据来自实际测试过程中记录的数据文件。本模块仅用于查看数据的内容以辅助判断数据的正确性。
		</div>
		
		<div class="col-sm-12">
		<hr />
		<p>for Debug only: Should be removed in released version </p>
		<pre>
			<div>{{ $data | json }}</div>
		</pre>	
		</div>
	</div>

    <script src="../../lib/jquery/2.1.4/jquery-2.1.4.min.js"></script>
    <script src="../../lib/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <script src="../../lib/vue/0.12.10/vue.js"></script>
    <script src="member-v3.js"></script>
</body>
</html>